package org.groupg.practice.javalin;

import io.javalin.Javalin;

public class HelloWorld {
    public static void main(String[] args) {
        var app = Javalin.create(/*config*/)
                .get("/", ctx -> ctx.result("Hello World"))
                .start(7070);
        app.before(ctx -> {
            // runs before all requests
            System.out.println(ctx.path());
        });
        app.before("/path/*", ctx -> {
            // runs before request to /path/*
            System.out.println("Hello World");
        });
        app.beforeMatched(ctx -> {
            // runs before all matched requests (including static files)
        });

    }
}